<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="root">
    <p>{{name}}</p>
    <one :name.sync="name"></one>
</div>
</body>
<script>
    new Vue({
        el: "#root",
        data :{
            name :'sxx'
        },
        components:{
            One:{
                props:['name'],
                template:(`
				    <div>
				        <h3></h3>
				        <button @click="$emit('update:name','小果核')">点击</button>
                    </div>
				`),
            }

        }
    })
</script>
</html>